package com.aquila.bible.activity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.aquila.bible.MyBaseActivity;
import com.aquila.bible.R;

public class AboutActivity extends MyBaseActivity implements OnClickListener {
	
	private Button scoreButton ;
//	private TextView intruduceTextView ;
//	private String bibleIntruduceString ;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about) ;
		scoreButton = (Button) findViewById(R.id.btn_score_app) ;
		scoreButton.setOnClickListener(this) ;
//		intruduceTextView = (TextView) findViewById(R.id.tv_about_content) ;
//		bibleIntruduceString = getResources().getString(R.string.bible_intrduce) ;
//		intruduceTextView.setText(Html.fromHtml(bibleIntruduceString)) ;
	}
	
	@Override
	public void onClick(View v) {
		if (v == scoreButton) {
			try {
				Intent intent = new Intent(Intent.ACTION_VIEW);
				intent.setData(Uri.parse("market://details?id=com.aquila.bible"));
				intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
				startActivityForResult(intent, 13);
			} catch (Exception e) {
				Toast.makeText(this, R.string.no_marcket_prompt, Toast.LENGTH_SHORT).show() ;
			}
		}
	}
	
	
	
}
